/* admission-form-2025.css */

/* General Styles */
:root {
    /* Define color palette */
    --primary-color: #4CAF50; /* Green for submit */
    --primary-color-dark: #45a049;
    --secondary-color: #f0f8ff; /* Light blue for notes */
    --secondary-border-color: #add8e6;
    --text-color: #333;
    --text-color-light: #555;
    --label-color: #444;
    --border-color: #ccc;
    --border-color-light: #ddd;
    --background-color: #f9f9f9;
    --background-color-light: #fff;
    --danger-color: #dc3545; /* Red for required */
    --focus-ring-color: rgba(76, 175, 80, 0.4); /* Subtle focus outline */

    /* Spacing */
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 2rem;     /* 32px */

    /* Typography */
    --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem; /* 16px */
    --font-size-sm: 0.875rem; /* 14px */
    --font-size-xs: 0.75rem;  /* 12px */
    --line-height-base: 1.6;
}

.entry-content {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Form Container */
.entry-content #admission-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1100px; /* Set a max-width for large screens */
    padding: 0;
    margin: 0 auto; /* Center the form container */
    gap: var(--space-lg); /* Space between form sections */
}

/* Form Sections */
.entry-content .form-section {
    margin-bottom: 0; /* Remove bottom margin, use gap in parent */
    background-color: var(--background-color-light);
    padding: var(--space-lg);
    border: 1px solid var(--border-color-light);
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    width: 100%; /* Full width within the centered container */
    box-sizing: border-box;
}

.entry-content .form-section h2,
.entry-content .form-section h5 {
    margin-top: 0;
    margin-bottom: var(--space-md);
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: var(--space-sm);
    font-weight: 600;
}

.entry-content .form-section h5 {
    font-size: 1.1em;
    color: var(--text-color-light);
    margin-top: var(--space-md); /* Add space above subheadings */
}

/* Form Grid Layout */
.entry-content .form-grid-3col,
.entry-content .form-grid-2col,
.entry-content .form-grid-1col {
    display: grid;
    gap: var(--space-md); /* Consistent gap for grid items */
    width: 100%;
}

.entry-content .form-grid-3col {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive columns */
}

.entry-content .form-grid-2col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
}

.entry-content .form-grid-1col {
    grid-template-columns: 1fr;
}

/* Form Group Styling */
.entry-content .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs); /* Space between label and input */
    /* Width is handled by the grid */
}

/* Label Styling */
.entry-content .form-group label {
    font-weight: 600;
    color: var(--label-color);
    font-size: var(--font-size-sm);
}

/* Required Field Indicator */
.entry-content .required {
    color: var(--danger-color);
    margin-left: var(--space-xs);
    font-weight: bold;
}

/* Input Fields Styling */
.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="tel"],
.entry-content input[type="date"],
.entry-content input[type="number"],
.entry-content input[type="file"],
.entry-content select,
.entry-content textarea {
    padding: var(--space-sm) var(--space-sm); /* More padding */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    background-color: var(--background-color-light);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    font-size: var(--font-size-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: auto; /* Ensure height adjusts to padding */
    min-height: 40px; /* Minimum height for better touch targets */
}

.entry-content input[type="text"]:focus,
.entry-content input[type="email"]:focus,
.entry-content input[type="tel"]:focus,
.entry-content input[type="date"]:focus,
.entry-content input[type="number"]:focus,
.entry-content input[type="file"]:focus,
.entry-content select:focus,
.entry-content textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring-color);
    outline: none;
}

/* File Input Specifics */
.entry-content input[type="file"] {
    padding: var(--space-xs); /* Adjust padding for file input */
    min-height: auto; /* Override min-height if needed */
    line-height: 1.5; /* Improve text alignment */
}
/* Style the file input button (browser-specific pseudo-elements) */
.entry-content input[type="file"]::file-selector-button {
    padding: var(--space-sm) var(--space-md);
    margin-right: var(--space-md);
    background-color: var(--primary-color);
    color: var(--background-color-light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: var(--font-size-sm);
}
.entry-content input[type="file"]::file-selector-button:hover {
    background-color: var(--primary-color-dark);
}


/* Select Dropdown Styling */
.entry-content select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right var(--space-sm) center;
    background-size: 16px;
    padding-right: var(--space-xl); /* Make space for the arrow */
}

/* Readonly Input Styling */
.entry-content input[readonly] {
    background-color: #eee;
    cursor: not-allowed;
}

/* Submit Button Styling */
.entry-content .form-group.submit-button {
    text-align: center;
    margin-top: var(--space-lg); /* Add space before submit */
}

.entry-content button[type="submit"] {
    padding: var(--space-md) var(--space-xl);
    background-color: var(--primary-color);
    color: var(--background-color-light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-base); /* Slightly larger font */
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: inline-block; /* Allow centering */
    width: auto; /* Adjust width based on content */
    min-width: 150px;
}

.entry-content button[type="submit"]:hover {
    background-color: var(--primary-color-dark);
}
.entry-content button[type="submit"]:active {
    transform: scale(0.98); /* Click effect */
}
.entry-content button[type="submit"]:focus {
    box-shadow: 0 0 0 3px var(--focus-ring-color);
    outline: none;
}

/* Important Notes Section */
.entry-content .important-notes {
    background-color: var(--secondary-color);
    border: 1px solid var(--secondary-border-color);
    padding: var(--space-md);
    border-radius: 6px;
    width: 100%; /* Full width within the centered container */
    box-sizing: border-box;
}

.entry-content .important-notes h2 {
    color: var(--text-color); /* Match text color */
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: var(--space-sm);
}

.entry-content .important-notes ol {
    padding-left: var(--space-lg); /* Indent list */
    margin-bottom: 0;
    margin-top: 0;
}

.entry-content .important-notes ol li {
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
}

.entry-content .required-note {
    font-style: italic;
    color: var(--text-color-light);
    font-size: var(--font-size-xs);
}

/* Checkbox and Radio Button Styling */
.entry-content .checkbox-group,
.entry-content .radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm); /* Space between options */
    margin-top: var(--space-xs); /* Space below group label/legend */
}

.entry-content .checkbox-group label,
.entry-content .radio-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm); /* Space between input and text */
    font-size: var(--font-size-sm);
    font-weight: normal; /* Normal weight for options */
    color: var(--text-color);
    cursor: pointer;
}

.entry-content .checkbox-group input[type="checkbox"],
.entry-content .radio-group input[type="radio"] {
    margin: 0; /* Remove default margin */
    transform: scale(1); /* Reset scale */
    width: 1.1em; /* Consistent size */
    height: 1.1em;
    accent-color: var(--primary-color); /* Modern way to color */
    cursor: pointer;
}

/* Fieldset and Legend for grouping */
.entry-content fieldset {
    border: 1px solid var(--border-color-light);
    padding: var(--space-md);
    border-radius: 4px;
    margin: 0; /* Reset margin */
    margin-top: var(--space-sm); /* Add space if needed below a label */
}

.entry-content legend {
    padding: 0 var(--space-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--label-color);
}

/* Conditional Field Styling */
.entry-content .conditional-field {
    /* Can add specific styles if needed, but visibility is handled by JS */
    margin-top: var(--space-md); /* Add space when shown */
    padding-left: var(--space-md); /* Indent slightly */
    border-left: 2px solid var(--primary-color);
}

/* Success Message Styling */
.entry-content .success-message {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green */
    border: 1px solid #c3e6cb;
    padding: var(--space-md);
    border-radius: 4px;
    margin-bottom: var(--space-lg);
    text-align: center;
    width: 100%;
    max-width: 800px; /* Consistent max-width */
    box-sizing: border-box;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .entry-content #admission-form {
        gap: var(--space-md); /* Reduce gap on smaller screens */
    }

    .entry-content .form-section {
        padding: var(--space-md);
    }

    /* Stacking grids earlier if needed, handled by auto-fit minmax now */
    /*
    .entry-content .form-grid-3col,
    .entry-content .form-grid-2col {
        grid-template-columns: 1fr;
    }
    */

    .entry-content button[type="submit"] {
        width: 100%; /* Full width button on mobile */
        max-width: 300px; /* Limit max width */
    }

    .entry-content .important-notes ol li {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 0.95rem; /* Slightly smaller base font on very small screens */
        --font-size-sm: 0.8rem;
        --font-size-xs: 0.7rem;
    }

     .entry-content .form-section {
        padding: var(--space-sm);
    }

    .entry-content .form-grid-3col,
    .entry-content .form-grid-2col,
    .entry-content .form-grid-1col {
        gap: var(--space-sm); /* Reduce gap further */
    }
}